<template>
  <div>
    <el-card shadow="hover" style="margin: 0px 0;">
      <div slot="header">
        <span>导入数据</span>
      </div>
      <e-row>
      <elm-upload module_name="biz_hrm_salary_files" :rel_id="modelId" :multiple="false" :limit="1"
                  list-type="file" tip="">

      </elm-upload>
<!--        style="position: fixed;margin-top: -63px;margin-left: 65px"-->
      <el-button type="success" style="margin-top: 10px"  size="mini" @click="importExcel">立即保存</el-button>
      </e-row>
    </el-card>



  </div>
</template>

<script>

export default {
  extends: elmVueBase,
  data() {
    return {
      model: {
        pid: elm.dialog.request.pid,
        progress:0,
        manager:null,
      },
      modelId:null,
      disable:false
    }
  },
  async created() {
    this.modelId =   new Date().getTime()
  },
  mounted() {

  },
  methods: {

    async importExcel() {
      let formData ={
        module_name : 'biz_hrm_salary_files',
        rel_id : this.modelId,
      }
      elm.post("/business/hrm/salary/ImportSalary", formData).then((res) => {
        this.close();
        this.v('保存成功。');
        this.request.callVue.tablebinding();
      })
    },
  }
}
</script>

<style scoped>
</style>